<{include file="admin/header.html"}>
			
			<ul id="main-nav">  <!-- Accordion Menu -->
				
				<li>
					<a href="<{spUrl c=admin a=index}>" class="nav-top-item no-submenu">控制面板</a>       
				</li>
				
				<li> 
					<a href="#" class="nav-top-item">文章</a>
					<ul>
						<li><a href="<{spUrl c=post a=write}>">撰写新文章</a></li>
						<li><a href="<{spUrl c=post a=index}>">文章管理</a></li>
						<li><a href="<{spUrl c=category a=index}>">分类管理</a></li>
					</ul>
				</li>
				
				<li>
					<a href="#" class="nav-top-item current">页面和区块</a>
					<ul>
						<li><a href="<{spUrl c=page a=write}>">撰写新页面</a></li>
                        <li><a href="<{spUrl c=area a=write}>">撰写新区块</a></li>
						<li><a class="current" href="<{spUrl c=page a=index}>">页面管理</a></li>
						<li><a href="<{spUrl c=area a=index}>">区块管理</a></li>
					</ul>
				</li>
				
				<li>
					<a href="#" class="nav-top-item">设置</a>
					<ul>
						<li><a href="<{spUrl c=user a=edit uid=$smarty.session.userinfo.uid}>">个人信息</a></li>
						<li><a href="<{spUrl c=user a=index}>">用户和权限</a></li>
					</ul>
				</li>      
				
			</ul> <!-- End #main-nav -->
			
		</div></div> <!-- End #sidebar -->
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>页面管理</h3>
										
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
				  <div class="tab-content default-tab" id="tab1">
                  <table>
							
							<thead>
								<tr>
								   <th>ID</th>
	<th>页面标题</th>
	<th>作者</th>
	<th>操作</th>
	</tr>
								
	</thead>
						 
							<tfoot>
								<tr>
									<td colspan="4">
										
										<div class="pagination">
											<{if $page_pager}> 
											<{if $page_pager.current_page != $page_pager.first_page}>  
											<a href="<{spUrl c=page a=pages page=$page_pager.first_page}>">&laquo; 前页</a> |  
											<a href="<{spUrl c=page a=pages page=$page_pager.prev_page}>">&laquo; 上一页</a> |  
											<{/if}>
											<!--开始循环页码，同时如果循环到当前页则不显示链接-->  
											<{foreach from=$page_pager.all_pages item=thepage}>  
											<{if $thepage != $page_pager.current_page}>  
											<a class="number" href="<{spUrl c=page a=pages page=$thepage}>"><{$thepage}></a>  
											<{else}>  
											<b class="number current"><{$thepage}></b>  
											<{/if}>  
											<{/foreach}>  
											<!--在当前页不是最后一页的时候，显示下一页和后页-->  
											<{if $page_pager.current_page != $page_pager.last_page}> |
											<a href="<{spUrl c=page a=pages page=$page_pager.next_page}>">下一页 &raquo;</a> |  
											<a href="<{spUrl c=page a=pages page=$page_pager.last_page}>">后页 &raquo;</a>  
											<{/if}>  
											<{/if}>
										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
							<{if $results == ""}>
							<tr>
								<td><center><font color="red">没有找到您要的页面！</font></center></td>
							</tr>
							<{else}>
								<{foreach from=$results item=one}>
								<tr>
									<td><a href="<{spUrl c=main a=pages slug=$one.slug}>"><{$one.id}></a></td>
									<td><a href="<{spUrl c=page a=edit id=$one.id}>"><{$one.title}></a></td>
									<td><{$one.author}></td>
									<td>
										<!-- Icons -->
										 <a href="<{spUrl c=page a=edit id=$one.id}>" title="Edit"><img src="/resources/images/icons/pencil.png" alt="Edit" /></a>
										 <a href="javascript:void(0);" onclick="delconfirm(<{$one.id}>,'<{$one.title}>');" title="Delete"><img src="/resources/images/icons/cross.png" alt="Delete" /></a> 
									</td>
								</tr>
								<{/foreach}>
							<{/if}>	
							</tbody>
							
						</table>
</div> 
					<!-- End #tab1 -->
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box --><!-- End .content-box --><!-- End .content-box -->
	    <div class="clear"></div>
<{include file="admin/footer.html"}>
<script>
function delconfirm(id,title){
	if( window.confirm("确定删除“" + title + "”？") ){
		window.location = "<{spUrl c=page a=del}>&id=" + id;
	}
}
</script>